import { usePublicStoreHook } from "@/store/modules/public";

// 过滤学院
export function filterCollege(college: any) {
  let data = [{ id: 1, name: "" }];
  data = usePublicStoreHook().collegeList;
  let name = "";
  data.forEach((item) => {
    if (Number(item.id) == Number(college)) {
      name = item.name;
    }
  });
  return name;
}
// 过滤专业
export function filterMajor(college: any) {
  let data = [{ id: 1, name: "" }];
  data = usePublicStoreHook().majorList;
  let name = "";
  data.forEach((item) => {
    if (Number(item.id) == Number(college)) {
      name = item.name;
    }
  });
  return name;
}
// 过滤年级
export function filterGrade(college: any) {
  let data = [{ id: 1, name: "" }];
  data = usePublicStoreHook().gradeList;
  let name = "";
  data.forEach((item) => {
    if (Number(item.id) == Number(college)) {
      name = item.name;
    }
  });
  return name;
}
